using System;
using System.Data;
using System.Collections;

namespace APP.QUANLY.Entity
{
     /// <summary>
     /// Summary description for CHIETKHAULOAIMATHANG.
     /// </summary>
     public class CHIETKHAULOAIMATHANG
    {
              private Int32 _MACHIETKHAU;
      private Int32 _MALOAIMATHANG;
      private decimal _MUCQUYDINHTU;
      private decimal _MUCQUYDINHDEN;
      private double _CHIETKHAU1;
      private double _CHIETKHAU2;
      private double _CHIETKHAU3;
      private bool _ISUSE;
        private bool isExisting;
        #region Properties
        public bool IsExisting
        {
              get{return isExisting;}
              set{isExisting = value;}
        }
		      public bool IsMACHIETKHAUNullable
      { get { return false;  } }
      public Int32 MACHIETKHAU
      {
         get { return _MACHIETKHAU; }
         set { _MACHIETKHAU = value; }
      }
      public bool IsMALOAIMATHANGNullable
      { get { return true;  } }
      public Int32 MALOAIMATHANG
      {
         get { return _MALOAIMATHANG;  }
         set { _MALOAIMATHANG = value; }
      }
      public bool IsMUCQUYDINHTUNullable
      { get { return true;  } }
      public decimal MUCQUYDINHTU
      {
         get { return _MUCQUYDINHTU;  }
         set { _MUCQUYDINHTU = value; }
      }
      public bool IsMUCQUYDINHDENNullable
      { get { return true;  } }
      public decimal MUCQUYDINHDEN
      {
         get { return _MUCQUYDINHDEN;  }
         set { _MUCQUYDINHDEN = value; }
      }
      public bool IsCHIETKHAU1Nullable
      { get { return true;  } }
      public double CHIETKHAU1
      {
         get { return _CHIETKHAU1;  }
         set { _CHIETKHAU1 = value; }
      }
      public bool IsCHIETKHAU2Nullable
      { get { return true;  } }
      public double CHIETKHAU2
      {
         get { return _CHIETKHAU2;  }
         set { _CHIETKHAU2 = value; }
      }
      public bool IsCHIETKHAU3Nullable
      { get { return true;  } }
      public double CHIETKHAU3
      {
         get { return _CHIETKHAU3;  }
         set { _CHIETKHAU3 = value; }
      }
      public bool IsISUSENullable
      { get { return true;  } }
      public bool ISUSE
      {
         get { return _ISUSE;  }
         set { _ISUSE = value; }
      }

        #endregion

        #region Constructors
        public CHIETKHAULOAIMATHANG()
        {
            Reset();
        }
        public CHIETKHAULOAIMATHANG(CHIETKHAULOAIMATHANG obj)
        {
            	this._MACHIETKHAU = obj.MACHIETKHAU;
	this._MALOAIMATHANG = obj.MALOAIMATHANG;
	this._MUCQUYDINHTU = obj.MUCQUYDINHTU;
	this._MUCQUYDINHDEN = obj.MUCQUYDINHDEN;
	this._CHIETKHAU1 = obj.CHIETKHAU1;
	this._CHIETKHAU2 = obj.CHIETKHAU2;
	this._CHIETKHAU3 = obj.CHIETKHAU3;
	this._ISUSE = obj.ISUSE;
        }
        #endregion

        public void Reset()
        {
                     _MACHIETKHAU = EmptyValues.v_Int32;
         _MALOAIMATHANG = EmptyValues.v_Int32;
         _MUCQUYDINHTU = EmptyValues.v_decimal;
         _MUCQUYDINHDEN = EmptyValues.v_decimal;
         _CHIETKHAU1 = EmptyValues.v_double;
         _CHIETKHAU2 = EmptyValues.v_double;
         _CHIETKHAU3 = EmptyValues.v_double;
         _ISUSE = EmptyValues.v_bool;
        }

         
        #region Hidden

        /*
        private void readProperties(IDataReader reader)
        {
            try
            {
                                if(!(reader["MACHIETKHAU"] is DBNull))
		{
			obj.MACHIETKHAU = (Int32)reader["MACHIETKHAU"];
		}
                if(!(reader["MALOAIMATHANG"] is DBNull))
		{
			obj.MALOAIMATHANG = (Int32)reader["MALOAIMATHANG"];
		}
                if(!(reader["MUCQUYDINHTU"] is DBNull))
		{
			obj.MUCQUYDINHTU = (decimal)reader["MUCQUYDINHTU"];
		}
                if(!(reader["MUCQUYDINHDEN"] is DBNull))
		{
			obj.MUCQUYDINHDEN = (decimal)reader["MUCQUYDINHDEN"];
		}
                if(!(reader["CHIETKHAU1"] is DBNull))
		{
			obj.CHIETKHAU1 = (double)reader["CHIETKHAU1"];
		}
                if(!(reader["CHIETKHAU2"] is DBNull))
		{
			obj.CHIETKHAU2 = (double)reader["CHIETKHAU2"];
		}
                if(!(reader["CHIETKHAU3"] is DBNull))
		{
			obj.CHIETKHAU3 = (double)reader["CHIETKHAU3"];
		}
                if(!(reader["ISUSE"] is DBNull))
		{
			obj.ISUSE = (bool)reader["ISUSE"];
		}
//            _MACHIETKHAU = (reader["MACHIETKHAU"] is DBNull)?DalTools.EmptyValues.v_Int32:(Int32)reader["MACHIETKHAU"];
//            _MALOAIMATHANG = (reader["MALOAIMATHANG"] is DBNull)?DalTools.EmptyValues.v_Int32:(Int32)reader["MALOAIMATHANG"];
//            _MUCQUYDINHTU = (reader["MUCQUYDINHTU"] is DBNull)?DalTools.EmptyValues.v_decimal:(decimal)reader["MUCQUYDINHTU"];
//            _MUCQUYDINHDEN = (reader["MUCQUYDINHDEN"] is DBNull)?DalTools.EmptyValues.v_decimal:(decimal)reader["MUCQUYDINHDEN"];
//            _CHIETKHAU1 = (reader["CHIETKHAU1"] is DBNull)?DalTools.EmptyValues.v_double:(double)reader["CHIETKHAU1"];
//            _CHIETKHAU2 = (reader["CHIETKHAU2"] is DBNull)?DalTools.EmptyValues.v_double:(double)reader["CHIETKHAU2"];
//            _CHIETKHAU3 = (reader["CHIETKHAU3"] is DBNull)?DalTools.EmptyValues.v_double:(double)reader["CHIETKHAU3"];
//            _ISUSE = (reader["ISUSE"] is DBNull)?DalTools.EmptyValues.v_bool:(bool)reader["ISUSE"];
            }
            catch (Exception ex)
            {
                throw new DalException("Failed to read properties from DataReader.", ex);
            }
        } 
        */

        #endregion


        public void Fill(Int32 MACHIETKHAU, Int32 MALOAIMATHANG, decimal MUCQUYDINHTU, decimal MUCQUYDINHDEN, double CHIETKHAU1, double CHIETKHAU2, double CHIETKHAU3, bool ISUSE)
        {
                     this._MACHIETKHAU = MACHIETKHAU;
         this._MALOAIMATHANG = MALOAIMATHANG;
         this._MUCQUYDINHTU = MUCQUYDINHTU;
         this._MUCQUYDINHDEN = MUCQUYDINHDEN;
         this._CHIETKHAU1 = CHIETKHAU1;
         this._CHIETKHAU2 = CHIETKHAU2;
         this._CHIETKHAU3 = CHIETKHAU3;
         this._ISUSE = ISUSE;
        }
    }
}